<?php if (!defined('THINK_PATH')) exit();?><style>
    .uploadpic {
        float: left;
        width: 295px;
        text-align: center;
        height: 165px;
    }

    .uploadpic h3 {
        text-align: left;
        border: 1px solid #95B8E7;
        float: left;
        padding: 4px;
        background-color: #95B8E7;
        color: #FFF;
    }

    .up-content {
        border: 1px solid #95B8E7;
        padding: 4px;
    }

    .w10 {
        float: left;
        width: 10px;
        color: #FFF;
    }

    .items {
        padding: 10px 0 4px 0;
        border-top: solid 1px #D6D4D4;
        display: block;
    }

    #dd div {
        padding-right: 10px;
        padding-bottom: 10px;
    }

    .addItems {
        float: left;
    }

    /*表格样式  */
    .add_table {
        width: 100%;
        border: 1px solid #0e90d2;
    }

    .add_table th {
        width: 80px;
        background-color: #E0ECFF;
        padding: 8px 0 8px 0;
        border-right: solid 1px #95B8E7;
        border-bottom: solid 1px #95B8E7;
    }

    .add_table td {
        border-bottom: solid 1px #95B8E7;
    }

    .add_table tr {
        border: solid 1px #95B8E7;
    }

    .tb_head {
        text-align: center;
        padding: 10px;
        background-color: #E0ECFF;
        font-size: 20px;
        font-weight: bold;
    }

    .inline {
        display: inline;
        padding-right: 5px;
    }

    .row_container {
        padding: 8px 5px 5px 5px;
    }


    .chuli_zl_title{
        font-size: 20px;
        color: #0e2d5f;
        text-align: center;
        padding: 10px;
        font-weight: bold;
    }
</style>
<div class="chuli_zl_title">处理质量问题</div>
    <form id="chuli_zl_form" action="/solve/index.php/Home/Quality/add_quality" enctype="multipart/form-data" method="post" style="padding:10px;">
        <table class="add_table">


            <tr>
                <th>原因分析：</th>
                <td>
                    <textarea name="fx" class="easyui-textbox" id="fx" style="width: 100%; height: 46px;"
                              data-options="required:true"></textarea>
                    <br/>
                </td>
            </tr>
            <tr>
                <th>整改措施</th>
                <td>
                    <textarea name="todo" class="easyui-textbox" id="todo" style="width: 100%; height: 46px;"
                              data-options="required:true"></textarea>
                    <br/>
                </td>
            </tr>
            <tr>
            <tr>
                <th>整改完成时间</th>
                <td>
                    <input id="overdate" name="overdate" class="easyui-datebox"
                           data-options="required:true,showSeconds:true" style="width:120px">
                    <br/>
                </td>
            </tr>

            <tr>
            <th>处理图片</th>
            <td>
                <input  name="chuli_pics[]" id="chuli_pics"  style="width:80%;"  data-options="multiple:true,buttonText:'上传图片',buttonIcon:'icon-standard-bullet-picture',buttonAlign:'right',accept:'image/*'"
                        class="easyui-filebox">
            <br/>
            </td>
            </tr>
            <!--<tr>-->
                <!--<th>责任人</th>-->
                <!--<td>-->
                    <!--<input id="zrr" name="zrr" class="easyui-textbox" data-options="iconCls:'icon-search'" style="width:300px">-->
                    <!--<br/>-->
                <!--</td>-->
            <!--</tr>-->
            <tr>

        </table>
        <input type="hidden" name="userid" id="userid" value=<?php echo ($_SESSION['uid']); ?>>
        <input type="hidden" name="author" id="author" value=<?php echo ($_SESSION['uname']); ?>>
        <input type="hidden" name="zrr" id="zrr" value=<?php echo ($_SESSION['unickname']); ?>>
    </form>




<div style="background-color: #E0ECFF;
    bottom: 0px;
    position: absolute;
    width: 100%;
    border: 1px solid #95b8e7;">
    <a href="#" class="easyui-linkbutton" onclick='newZg()'
       data-options="iconCls:'icon-standard-page-word',plain:true">添加处理</a>
    <a href="#"  class="easyui-linkbutton" onclick='clearForm()'
       data-options="iconCls:'icon-standard-coins-delete',plain:true">清空</a>
    <a href="#"  class="easyui-linkbutton" onclick='back_zl_list()'
       data-options="iconCls:'icon-standard-cup-go',plain:true">返回</a>
</div>
<script>
    function back_zl_list(){
        var tab = $('#tab').tabs('getSelected');
        tab.panel('refresh', APP+'/Home/Zhiliang/index');
    }
    function newZg(){
        $('#chuli_zl_form').form('submit', {

            url :APP+ '/Home/Zhiliang/chuli',
            onSubmit: function(param){
                param.id = '<?php echo ($id); ?>';
            },


            success : function(data) {
                var data=$.parseJSON(data);
                $('#chuli_zl_form').form('clear');
                $.messager.confirm('确认',data.msg+'是否要返回列表页面',function(r){
                    if (r){
                        var tab = $('#tab').tabs('getSelected');
                        tab.panel('refresh', APP+'/Home/Zhiliang/index');
                    }
                });
            }
        });
    }
function clearForm(){
    $.messager.confirm('确认','您确认想要清空记录吗？',function(r){
        if (r){
            $('#chuli_zl_form').form('clear');
        }
    });
}




</script>